<!--右侧内容开始-->
<div class="fadeIn">
    <br />
    <ol class="breadcrumb">
        <li class="active">
            <span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;
            <mainpage></mainpage>
        </li>
        <li class="active">运维工作台 / 专线互联网切换</li>
    </ol>
    <div class="rightbar">
        <div class="row clearfix marT15 marB15" style="margin-left: 0px;">
            <!-- <button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#add1" ng-click="switchB()">一键切换</button> -->
            <button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#add2">自动/手动</button>
        </div>
        <div style="width:100%; overflow-x: auto;">

            <table class="table table-bordered table-striped text-center bg-info">
                <thead>
                    <tr class="info">
                        <th class="text-center">序号</th>
                        <th class="text-center">短信通道ID</th>
                        <th class="text-center">短信通道名称</th>
                        <th class="text-center">线路类型</th>
                        <th class="text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="Item in result">
                        <td>{{ $index+1 }}</td>
                        <td class="w115">{{ Item.gateLinkId }}</td>
                        <td class="w115">{{ Item.gateLinkName }}</td>
                        <td>
                            <span ng-if='"1"==Item.lineType'>专线</span>
                            <span ng-if='"2"==Item.lineType'>互联网</span>
                        </td>
                        <td style="min-width: 140px">
                            <a class="" data-toggle="modal" data-target="#add" ng-click="switchA('2',Item.recId,Item.lineType)" ng-show="Item.lineType=='1'">切换到互联网线路</a>
                            <a class="" data-toggle="modal" data-target="#add" ng-click="switchA('1',Item.recId,Item.lineType)" ng-show="Item.lineType=='2'">切换到专线线路</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="add">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="">专线互联网切换</h4>
            </div>
            <div class="modal-body">
                <div class="row marB15">
                    <span class="col-xs-12">
                        <label class="left">
                            <span>请输入您的密码：</span>
                        </label>
                        <input type="password" class="form-control line4 right" ng-model="switchData.pwd" />
                    </span>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click="startAll()">切换</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="add2" tabindex="-1" role="dialog" aria-labelledby="add2">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="">专线互联网手自动切换</h4>
            </div>
            <div class="modal-body">
                <div class="row marB5">
                    <span class="col-xs-12">
                        <label class="left">
                            <span style="margin-right: 10px;">专线互联网手自动切换:</span>
                        </label>
                        <label class="radio-inline">
                            <input type="radio" value="1" ng-model="switchData1.status">自动
                        </label>
                        <label class="radio-inline">
                            <input type="radio" value="2" ng-model="switchData1.status">手动
                        </label>
                    </span>
                </div>
            </div>
            <div class="modal-body">
                <div class="row marB5">
                    <span class="col-xs-12">
                        <label class="left">
                            <span>请输入您的密码：</span>
                        </label>
                        <input type="password" class="form-control line4 right" ng-model="switchData1.pwd" />
                    </span>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click="allChange()">切换</button>
            </div>
        </div>
    </div>
</div>

<!-- 提示框 -->
<div class="modal fade" id="delete">
    <div class="modal-dialog">
        <div class="modal-content message_align">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">提示信息</h4>
            </div>
            <div class="modal-body">
                <p>您确认切换吗？</p>
            </div>
            <div class="modal-footer">
                <input type="hidden" id="url" />
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <a class="btn btn-primary" data-dismiss="modal" ng-click="startAll()">确定</a>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!-- 提示框结束 -->


<!-- <div class="modal fade" id="add2">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="">一键切换</h4>
            </div>
           <div class="row marB15 ">               
                   <label class="col-xs-6 "><span>请输入您的密码：</span></label>
                   <span class="col-xs-6 "><input type="password " class="form-control line4 " ng-model="addData.pwd "/>
                   </span>
                   
           </div>
        </div>
        <div class="modal-footer ">
            <button type="button " class="btn btn-default btn-sm " data-dismiss="modal ">取消</button>
            <button type="button " class="btn btn-primary btn-sm " ng-click="allChange() ">切换</button>
        </div>
    </div>
</div> -->
<!-- 加载框 -->
<span class='loaded' ng-show='loaded'><img src="img/load.gif "></span>
<!-- 加载框 完成-->